package com.cdream.bank2.seata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdream.bank.domain.AccountInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zs
 * @since 2021-08-29
 */
public interface AccountInfoMapper extends BaseMapper<AccountInfo> {
    @Update("UPDATE account_info SET account_balance = account_balance + #{amount} WHERE account_no = #{accountNo}")
            int updateAccountBalance(@Param("accountNo") String accountNo, @Param("amount") Double amount);

}
